home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / relnotes / modules / ch2.z / ch2
Encoding:
Text File  |  2002-10-08  |  2.0 KB  |  60 lines

  1. Modules installation notes
  2. --------------------------
  3.  
  4. The Modules package currently installs entirely into /opt/modules/2.2.2.4.
  5. The manpages exist in that directory. 
  6.  
  7. You must create a symbolic link named modules which points to the version
  8. installed if it is not already present. This will set the default version
  9. of modules. Initial installs of the modules package will create this link
  10. if one is not present. Subsequent installs will remove the old link, the
  11. old software version, and create a new link.
  12.  
  13. # cd /opt/modules
  14. # ln -s 2.2.2.4 modules
  15.  
  16. Users must initilize modules and load the 'modules' modulefile to
  17. see the manpages (module, modulesfile).
  18. e.g. (csh)
  19. % source /opt/modules/modules/init/csh
  20. % module load modules
  21. % man module
  22. % man modulefile
  23.  
  24. The /etc/cshrc and /etc/profile can be used to initialize modules.
  25. It is strongly suggested that users add the initilization to their login
  26. scripts so modules is readily available in sub-shells and batch environments.
  27. Since the "module" command is an alias in csh and a function in ksh,
  28. the following examples work well.
  29.  
  30. C-shell .login and .cshrc:
  31.  
  32. # This initilizes modules in your initial login and remote shells (.login).
  33. if (-f /opt/modules/modules/init/csh) then
  34.    source /opt/modules/modules/init/csh
  35.    module load modules
  36. endif
  37.  
  38. # This initializes the module command in csh subshells (.cshrc). No need
  39. # to reload any modulefiles.
  40. if (-f /opt/modules/modules/init/csh) then
  41.    source /opt/modules/modules/init/csh
  42. endif
  43.  
  44. KSH (POSIX) .profile and .env:
  45.  
  46. # This initilizes modules in your initial login shell (.profile).
  47. if [ -f /opt/modules/modules/init/ksh ] ; then
  48.    . /opt/modules/modules/init/ksh
  49.    module load modules
  50. fi
  51.  
  52. # This initializes the module command in ksh subshells (e.g. $ENV=.env).
  53. # No need reload any modulefiles.
  54. if [ -f /opt/modules/modules/init/ksh ] ; then
  55.    . /opt/modules/modules/init/ksh
  56. fi
  57.  
  58. The modulefile manpage explains the basics in creating a modulefile.
  59. Since modulefiles are basicly Tcl scripts, knowledge of Tcl is helpful.
  60.